<?php
/**
 * This file belongs to huakaili project
 *
 * @author jszhang
 */
?>
<div id="sidebar_right">
	<?php
	if( $errmsg->size('privacy_setting') > 0 ) $errmsg->output('privacy_setting');
	?>
	
	<h2>隐私设置</h2>
	<a href="#">查看隐私声明</a>
	<hr />

	<h2>我愿意公开以下信息</h2>
	<span style="color:red">（选中的为公开信息）</span>
	<form method="POST" action="<?php echo edp_href_link(PAGENAME_USER_SETTING, 'subpage=privacy_setting');?>">
		<input type="hidden" id="action" name="action" value="privacy_setting" >
		<input type="hidden" id="id" name="id" value="<?php echoPageVar($pageVars, "id");?>" />
		<ul>
			<li>
				<input id="chkbasic_info_display" type="checkbox" name="basic_info_display" value="1" <?php echo $pageVars["basic_info_display"]?"checked":"";?> />
				<label for="chkbasic_info_display">我的基本信息</label>
			</li>
			<li>
				<input id="chkdetail_info_display" type="checkbox" name="detail_info_display" value="1" <?php echo $pageVars["detail_info_display"]?"checked":"";?> />
				<label for="chkdetail_info_display">我的详细信息</label>
			</li>
			<li>
				<input id="chkfriend_display" type="checkbox" name="friend_display" value="1" <?php echo $pageVars["friend_display"]?"checked":"";?> />
				<label for="chkfriend_display">我的好友</label>
			</li>
			<li>
				<input id="chkadd_shop" type="checkbox" name="add_shop" value="1" <?php echo $pageVars["add_shop"]?"checked":"";?> />
				<label for="chkadd_shop">添加店铺</label>
			</li>
			<li>
				<input id="chkadd_product" type="checkbox" name="add_product" value="1" <?php echo $pageVars["add_product"]?"checked":"";?> />
				<label for="chkadd_product">添加商品</label>
			</li>
			<li>
				<input id="chkfriendlist" type="checkbox" name="add_friend_list" value="1" <?php echo $pageVars["add_friend_list"]?"checked":"";?> />
				<label for="chkfriendlist">添加好友和好友列表</label>
			</li>
			<li>
				<input id="chkdelete_friend_list" type="checkbox" name="delete_friend_list" value="1" <?php echo $pageVars["delete_friend_list"]?"checked":"";?> />
				<label for="chkdelete_friend_list">删除好友和添加黑名单</label>
			</li>
			<li>
				<input id="chkupdate_avatar" type="checkbox" name="update_avatar" value="1" <?php echo $pageVars["update_avatar"]?"checked":"";?> />
				<label for="chkupdate_avatar">上传头像</label>
			</li>
			<li>
				<input id="chkcollection_display" type="checkbox" name="collection_display" value="1" <?php echo $pageVars["collection_display"]?"checked":"";?> />
				<label for="chkcollection_display">收藏店铺</label>
			</li>
			<li>
				<input id="chkreport_error" type="checkbox" name="report_error" value="1" <?php echo $pageVars["report_error"]?"checked":"";?> />
				<label for="chkreport_error">举报错误</label>
			</li>
			<li>
				<input id="chkadd_comment" type="checkbox" name="add_comment" value="1" <?php echo $pageVars["add_comment"]?"checked":"";?> />
				<label for="chkadd_comment">发表评论</label>
			</li>
			<li>
				<input id="chkprivate_info_display" type="checkbox" name="private_info_display" value="1" <?php echo $pageVars["private_info_display"]?"checked":"";?> />
				<label for="chkprivate_info_display">账户私人信息</label>
			</li>
			<li>
				<input id="chkmsg_display" type="checkbox" name="msg_display" value="1" <?php echo $pageVars["msg_display"]?"checked":"";?> />
				<label for="chkmsg_display">收发站内信消息</label>
			</li>
			<li>
				<input id="chkfootprint_display" type="checkbox" name="footprint_display" value="1" <?php echo $pageVars["footprint_display"]?"checked":"";?> />
				<label for="chkfootprint_display">访问其他会员主页</label>
			</li>
		</ul>
		<span style="color:red">* 未公开的信息只有自己才能看到，他人浏览时不显示。</span>
		<br  /><br  />

		<table>
			<tbody>
				<tr>
					<td valign="top">
						<h2>这些信息会被公开：</h2>
						<ul>
							<?php
				foreach( $pageVars['summary']['public'] as $item ){
					?>
								<li><?php echo $infoMap[$item]?></li>
							<?php
				}
				?>
						</ul>
					</td>
					<td valign="top">
						<h2>这些信息不会被公开：</h2>
						<ul>
							<?php
				foreach( $pageVars['summary']['private'] as $item ){
				?>
								<li><?php echo $infoMap[$item]?></li>
							<?php
				}
				?>
						</ul>
					</td>
				</tr>
			</tbody>
		</table>
		<br  />
		
		<input type="submit" value="保存设置" />
	</form>
</div>
